Skip to content

Conversation

@simonspa
Copy link
Contributor

On our page we would like to collapse the sidebar TOCs down to their :caption: elements as described in the PyData Theme docs.

However, we would like to do this only on a single page. Currently this can only be set as a global theme option.

This PR adds the possibility of setting this per-page via the page metadata as described in the docs:

---
html_theme.show_nav_level: 0
---

@Carreau Carreau force-pushed the p-per-page-nav-levels branch from 840e3e0 to de2f885 Compare October 4, 2025 08:35
@simonspa
Copy link
Contributor Author

simonspa commented Nov 3, 2025

@Carreau is something missing for this PR to move forward? Would you mind reviewing?

@drammock drammock merged commit 4605455 into pydata:main Nov 3, 2025
31 checks passed
@drammock
Copy link
Member

drammock commented Nov 3, 2025

sorry for the long delay @simonspa . This LGTM

@simonspa
Copy link
Contributor Author

simonspa commented Nov 4, 2025

No worries, thanks for looking at it and taking it in @drammock ! Looking forward to the next release! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants